package com.example.certificate.dto;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class SendSmsDTO {

    @ApiModelProperty(value = "手机号码")
    @Pattern(regexp = "^1\\d{10}$", message = "手机号码不合法", groups = {sendGroup.class, checkGroup.class})
    private String phone;

    @ApiModelProperty(value = "验证码，发送验证码接口不需要传")
    @NotBlank(message = "验证码不能为空", groups = {checkGroup.class})
    private String code;

    public interface sendGroup{}

    public interface checkGroup{}

}
